﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using BUS;
using DTO;
namespace nhahangbarota
{
    public partial class VAT : Form
    {
        public VAT()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            VATBUS BUS = new VATBUS();
            VATDTO DTO = new VATDTO(Convert.ToInt32( txtVAT.Text));
            BUS.Loadhoadon(DTO);
            this.Close();
            Formchinh a = new Formchinh();
            a.ShowDialog();
            
           
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
            Formchinh a = new Formchinh();
            a.ShowDialog();
            
        }

        private void VAT_Load(object sender, EventArgs e)
        {
            VATBUS BUS = new VATBUS();
            txtVAT.Text= BUS.LoadVAT().Rows[0][0].ToString();
        }
    }
}
